.class public Lrexsee/keyboard/KeyboardDialog;
.super Lrexsee/core/widget/DivDialog;
.source "KeyboardDialog.java"


# instance fields
.field private final mView:Lrexsee/keyboard/KeyboardWidget;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;Lrexsee/keyboard/KeyboardParameters;)V
    .locals 4
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "id"    # Ljava/lang/String;
    .param p3, "style"    # Ljava/lang/String;
    .param p4, "para"    # Lrexsee/keyboard/KeyboardParameters;

    .prologue
    .line 15
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "width:wrapcontent;height:wrapcontent;window-cancelable:false;window-outside-cancelable:false;window-modeless:true;window-moveable:true;window-dim-amount:0;background-color:transparent;border-width:0;alpha:1;"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, p1, p2, v0}, Lrexsee/core/widget/DivDialog;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 17
    new-instance v0, Lrexsee/keyboard/KeyboardWidget;

    invoke-direct {v0, p1, p4}, Lrexsee/keyboard/KeyboardWidget;-><init>(Lrexsee/core/browser/Browser;Lrexsee/keyboard/KeyboardParameters;)V

    iput-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->mView:Lrexsee/keyboard/KeyboardWidget;

    .line 18
    iget-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->mView:Lrexsee/keyboard/KeyboardWidget;

    invoke-virtual {p0, v0}, Lrexsee/keyboard/KeyboardDialog;->addChild(Landroid/view/View;)V

    .line 19
    iget-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->icon:Landroid/graphics/drawable/Drawable;

    if-eqz v0, :cond_0

    .line 20
    iget-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->div:Lrexsee/core/widget/Div;

    iget-object v0, v0, Lrexsee/core/widget/Div;->mRightBorder:Landroid/widget/ImageView;

    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    iget-object v2, p0, Lrexsee/keyboard/KeyboardDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getIconWidth()I

    move-result v2

    const/4 v3, -0x1

    invoke-direct {v1, v2, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 21
    iget-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->div:Lrexsee/core/widget/Div;

    iget-object v0, v0, Lrexsee/core/widget/Div;->mRightBorder:Landroid/widget/ImageView;

    iget-object v1, p0, Lrexsee/keyboard/KeyboardDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v1}, Lrexsee/core/style/StyleSheet;->getIconScaleType()Landroid/widget/ImageView$ScaleType;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 22
    iget-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->div:Lrexsee/core/widget/Div;

    iget-object v0, v0, Lrexsee/core/widget/Div;->mRightBorder:Landroid/widget/ImageView;

    iget-object v1, p0, Lrexsee/keyboard/KeyboardDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v1}, Lrexsee/core/style/StyleSheet;->getIconAlpha()I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setAlpha(I)V

    .line 23
    iget-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->div:Lrexsee/core/widget/Div;

    iget-object v0, v0, Lrexsee/core/widget/Div;->mRightBorder:Landroid/widget/ImageView;

    iget-object v1, p0, Lrexsee/keyboard/KeyboardDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->icon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 26
    :cond_0
    return-void
.end method


# virtual methods
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2
    .param p1, "keyCode"    # I
    .param p2, "event"    # Landroid/view/KeyEvent;

    .prologue
    const/4 v1, 0x1

    .line 30
    const/4 v0, 0x4

    if-ne p1, v0, :cond_2

    .line 31
    iget-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->menu:Lrexsee/core/menu/RexseeMenu;

    iget-boolean v0, v0, Lrexsee/core/menu/RexseeMenu;->isOptionsMenuOpen:Z

    if-eqz v0, :cond_0

    .line 32
    iget-object p0, p0, Lrexsee/keyboard/KeyboardDialog;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/keyboard/KeyboardDialog;
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->closeOptionsMenu()V

    move v0, v1

    .line 46
    :goto_0
    return v0

    .line 35
    .restart local p0    # "this":Lrexsee/keyboard/KeyboardDialog;
    :cond_0
    iget-object v0, p0, Lrexsee/keyboard/KeyboardDialog;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->function:Lrexsee/core/browser/RexseeBrowser;

    invoke-virtual {v0}, Lrexsee/core/browser/RexseeBrowser;->goBack()V

    .line 46
    .end local p0    # "this":Lrexsee/keyboard/KeyboardDialog;
    :cond_1
    :goto_1
    const/4 v0, 0x0

    goto :goto_0

    .line 37
    .restart local p0    # "this":Lrexsee/keyboard/KeyboardDialog;
    :cond_2
    const/16 v0, 0x52

    if-ne p1, v0, :cond_3

    .line 38
    iget-object p0, p0, Lrexsee/keyboard/KeyboardDialog;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/keyboard/KeyboardDialog;
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->openOptionsMenu()V

    goto :goto_1

    .line 39
    .restart local p0    # "this":Lrexsee/keyboard/KeyboardDialog;
    :cond_3
    const/16 v0, 0x54

    if-ne p1, v0, :cond_4

    move v0, v1

    .line 40
    goto :goto_0

    .line 41
    :cond_4
    const/16 v0, 0x50

    if-eq p1, v0, :cond_1

    .line 42
    const/16 v0, 0x18

    if-eq p1, v0, :cond_1

    goto :goto_1
.end method
